{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "ncjQuwOgT4W3"
      },
      "source": [
        "# 🗣️ ChatTTS-Forge Colab\n",
        "\n",
        "👋本脚本基于 [ChatTTS-Forge](https://huggingface.co/spaces/lenML/ChatTTS-Forge) 构建。如果此项目对你有帮助，欢迎到 github 为我们 star 支持！也欢迎提交 pr issues~\n",
        "\n",
        "感谢您的支持！\n",
        "\n",
        "## 运行指南\n",
        "\n",
        "1. 在菜单栏中选择 **代码执行程序**。\n",
        "2. 点击 **全部运行**。\n",
        "\n",
        "运行完成后，请在下方日志中找到如下信息：\n",
        "\n",
        "```\n",
        "Running on public URL: https://**.gradio.live\n",
        "```\n",
        "\n",
        "该链接即为您可以访问的公网地址。\n",
        "\n",
        "> 注意：如果在安装包时提示需要重启，请选择 \"否\"。"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "09UPJy1gP045"
      },
      "outputs": [],
      "source": [
        "# 1. Clone the repository\n",
        "!git clone https://github.com/lenML/ChatTTS-Forge\n",
        "\n",
        "# 2. Change directory to the repository\n",
        "%cd ChatTTS-Forge\n",
        "\n",
        "# 3. Install ffmpeg and rubberband-cli\n",
        "!apt-get update -y\n",
        "!apt-get install -y ffmpeg rubberband-cli\n",
        "\n",
        "# 4. Install PyTorch\n",
        "!pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113\n",
        "\n",
        "# 5. Install dependencies\n",
        "!pip install -r requirements.txt\n",
        "\n",
        "# 6. download models\n",
        "!python -m scripts.download_models --source huggingface\n",
        "\n",
        "# 7. Run the web interface\n",
        "!python webui.py --share --language=zh-CN\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "hLupWhOXT1kt"
      },
      "source": []
    }
  ],
  "metadata": {
    "accelerator": "GPU",
    "colab": {
      "gpuType": "T4",
      "provenance": []
    },
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}
